﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace eCommMongo.Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                  "install",
                  "install",
                  new { area = "Install", controller = "Install", action = "Index" }
                  );

            routes.MapRoute(
                "orders",
                "orders",
                new { area = "", controller = "Order", action = "List" }
                );
            routes.MapRoute(
                "MyInterstedTags",
                "MyInterstedTags",
                new { area = "", controller = "Tags", action = "MyInterestedTags" }
                );

            routes.MapRoute(
               "ConfigTags",
               "ConfigTags",
               new { area = "", controller = "CustomerTag", action = "ChooseIneterstedTags", isFromRegist = false }
               );

            routes.MapRoute(
                "ChooseTags",
                "ChooseTags",
                new { area = "", controller = "Tags", action = "ChooseIneterstedTags", isFromRegist = true }
                );

            routes.MapRoute(
                "statusestaged",
                "posts",
                new { area = "", controller = "Post", action = "PostTaged" }
                );


            routes.MapRoute(
                "cart",
                "cart",
                new { area = "", controller = "ShoppingCart", action = "cart" }
                );

            routes.MapRoute(
                "statushomepage",
                "posts/{customerid}",
                new { area = "", controller = "Post", action = "Show" }
                );

            routes.MapRoute(
                "shopproducts",
                "products",
                new { area = "", controller = "Product", action = "Index" }
                );

            routes.MapRoute(
                "statusdetail",
                "post/{postId}",
                new { area = "", controller = "Post", action = "Post" }
                );

            routes.MapRoute(
                "login",
                "login",
                new { area = "", controller = "Customer", action = "Login" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}